package com.ibeetl.cms.service;

import com.ibeetl.admin.core.service.BaseService;
import com.ibeetl.cms.dao.RelativesDao;
import com.ibeetl.cms.entity.Relatives;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class RelativesService extends BaseService<Relatives> {
    @Autowired
    private RelativesDao relativesDao;

    public List<Relatives> findAllRelativesId(Integer relativesId){
       return relativesDao.findAllRelativesId(relativesId);
    }

    public  Boolean deleteRelatives(Integer id){
        return  relativesDao.deleteRelatives(id)>0;
    }

    public  Boolean deleteRelativesByParam(Integer relativesId){
        return  relativesDao.deleteRelativesByParam(relativesId)>0;
    }

    public Relatives  findRelativesId(Integer id){
        return relativesDao.findRelativesId(id);
    }
}
